import React from 'react'
import TicketList from './components/TicketList'
import { getTicketListApi } from '../../api/ticket'
import MyDate from './components/MyavBr'
import MyavBr from './components/MyavBr'
import TicketFooter from './components/TicketFooter'
const List = () => {
  return (
    <div>
      列表
      <MyavBr />

      <MyDate />

      <TicketList />
      <TicketFooter />
    </div>
  )
}

export default List


export const loader = async({request})=>{
    const url= new URL(request.url)
    const data=Object.fromEntries(url.searchParams)

    const {data:res}=await getTicketListApi(data)
    console.log(res);
    return {list:res}
    
}
